import { resolve } from 'node:path'
import { defineConfig, externalizeDepsPlugin, swcPlugin } from 'electron-vite'
import renderer from './vite.config'

export default defineConfig({
  main: {
    plugins: [externalizeDepsPlugin(), swcPlugin()],
    resolve: {
      alias: {
        '@main': resolve('src/main'),
      },
    },
  },
  preload: {
    plugins: [externalizeDepsPlugin()],
  },
  renderer: renderer,
})
